{extend name='common'}
{block name="link"}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/AcmenXiaoKe/static@master/admin/css/manage-posts.css">
{/block}

{block name="header"}
{include file='common/header'}
{/block}

{block name="main"}
        <div class="layui-body">
            <div class="layui-body_box">
                <div class="layui-body_wrap">
                    <div class="layui-body_wrap_title">文章管理</div>
                    <div class="operation_wrap">
                        <a href="/admin/write_post">
                        <button class="newDate_btn">新增文章</button></a>
                    </div>
                    <table class="layui-table article_table">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>标题</th>
                                <th>作者</th>
                                <th>日期</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        {volist  name='data' id='item'}
                            <tr>
                                <td>{$item.aid}</td>
                                <td>{$item.title}</td>
                                <td>{$item.author}</td>

                                <td>{$item.release_date}</td>
                                <td>
                                    <input class="xk_checkbox" type="checkbox"  data-id="{$item.aid}" {$item.state == 0  ? '' : 'checked'} >
                                </td>
                                <td>
                                    <div class="article_handle_wrap">
                                        <a href="/admin/write_post?aid={$item.aid}"><button class="article_handle_item edit">
                                            <span class="layui-icon layui-icon-edit article_handle_item_icon"></span>
                                        </button></a>
                                        <button class="article_handle_item delete" onclick="Datadel({$item.aid})">
                                            <span class="layui-icon layui-icon-delete article_handle_item_icon" ></span>
                                        </button>
                                    </div>
                                </td>
                            </tr>
                        {/volist}
                        </tbody>
                    </table>
                    {$data|raw}
                </div>
            </div>
        </div>
{/block}
{block name="aside"}
{include file='common/aside'}
{/block}
{block name="footer_script"}
<script src="https://cdn.jsdelivr.net/gh/AcmenXiaoKe/static@master/admin/js/manage-posts.js"></script>
{/block}